package com.library.util;

import com.library.entity.Admin;

public class AdminContext {

    private static final ThreadLocal<Admin> admin = new ThreadLocal<>();

    public static void setAdmin(Admin admin) {
        AdminContext.admin.set(admin);
    }

    public static Admin getAdmin() {
        return admin.get();
    }

    public static void removeAdmin() {
        admin.remove();
    }
}
